package com.training1.core.modules.service;


import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.training1.core.common.service.CrudService;
import com.training1.core.entity.DelayMoneyEntity;
import com.training1.core.entity.FunButtonEntity;
import com.training1.core.entity.FunRoleEntity;
import com.training1.core.entity.RoleEntity;
import com.training1.core.modules.dao.DelayMoneyDao;
import com.training1.core.modules.dao.RoleDao;

@Service
@Transactional
public class RoleService extends CrudService<DelayMoneyDao,DelayMoneyEntity>{

	@Resource
	private RoleDao roleDao;

	public List<RoleEntity> find(String roleName){
		return roleDao.find(roleName);
	}
	
	public String findRoleName(String roleId){
		return roleDao.findRoleName(roleId);
	}
	
	public Integer findExist(String roleId){
		return roleDao.findExist(roleId);
	}
	
	public void deleteRole(String roleId){
		roleDao.deleteRole(roleId);
	}
	
	public void updateRoleName(String roleId,String roleName){
		roleDao.updateRoleName(roleId, roleName);
	}
	
	public Integer findExistRoleName(String roleName){
		return roleDao.findExistRoleName(roleName);
	}
	
	public void insertRole(RoleEntity Role){
		roleDao.insertRole(Role);
	}
	
	public Integer findMaxRoleId(){
		return roleDao.findMaxRoleId();
	}
	
	public List<RoleEntity> findAllRoleName(){
		return roleDao.findAllRoleName();
	}
	
	public List<FunButtonEntity> findAllFunButton(){
		return roleDao.findAllFunButton();
	}
	
	public String[] findUseFul(String roleId){
		return roleDao.findUseFul(roleId);
	}
	
	public void updateRoleFun(String roleId){
		roleDao.updateRoleFun(roleId);
	}
	
	public void insertRoleFun(FunRoleEntity FunRole){
		roleDao.insertRoleFun(FunRole);
	}
	public List<RoleEntity> userfindName(){
		return roleDao.userfindName();
	}
}
